function ajax({
    type = "GET",
    url = "",
    data = null
}) {
    return new Promise((resolve, reject) => {
        $.ajax({
            url: url,
            type: type,
            data: data,
            dataType: "json",
            success: function(response) {
                resolve(response)
            }
        });
    })
}


export const getNewsClassify = () => ajax({
    url: "/api/news_classify.php"
})

export const getNewsList = () => ajax({
    url: "/api/news_list.php"
})